﻿@page
@model FytSoa.Web.Pages.FytAdmin.DefaultModel
@{
    ViewData["Title"] = "FytSoaCms后台管理";
    Layout = AdminLayout.Pjax(HttpContext);
}
<div id="container">
    <style>
        body {
            background-color: #f1f4f5;
        }
    </style>
    <div class="layui-fluid" id="defaultapp">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12 layui-col-lg12">
                <div class="layui-row layui-col-space15">
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header">版本信息</div>
                            <div class="layui-card-body layui-text" style="height:210px;">
                                <table class="layui-table">
                                    <colgroup>
                                        <col width="100">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                        <tr>
                                            <td>欢迎您</td>
                                            <td>
                                                @(Model.Admin.LoginName+" "+Model.Admin.DepartmentName)
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>更新时间</td>
                                            <td>上次登录日期：@Model.Admin.LoginDate　　<a href="/fytadmin/sys/log/">查看日志</a></td>
                                        </tr>
                                        <tr>
                                            <td>当前版本</td>
                                            <td>
                                                V1.0.0  pro最后　更新时间：2017-07-20
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>授权说明</td>
                                            <td>
                                                本系统是北京飞易腾科技有限公司授权予 @Model.Site.SiteName 使用！
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>求助帮助</td>
                                            <td>
                                                <a href="http://www.feiyit.com" target="_blank" class="layui-badge layui-bg-blue">联系客服</a>　　<span class="layui-badge layui-bg-gray">13511084034</span>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header">站长工具(PR/Alexa/收录查询)</div>
                            <div class="layui-card-body layui-text" style="height:210px;">
                                <form class="layui-form form-cus" action="http://www.alexa.cn/index.php" method="get" target="_blank">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">网站域名</label>
                                        <div class="layui-input-block fyt-upfile">
                                            <input type="text" name="url" value="@Model.Site.SiteUrl" autocomplete="off" placeholder="请输入域名" class="layui-input">
                                            <button type="submit" class="layui-btn">确定查询</button>
                                        </div>
                                    </div>
                                    <blockquote class="layui-elem-quote layui-elem-warning" style="margin-left:37px;">
                                        <i class="layui-icon layui-icon-about"></i>说明：利用本工具您可以查询指定网站的Google PageRank、网站被各大搜索引擎收录情况、网站Alexa排名等。
                                    </blockquote>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-lg12 layui-col-md12">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">文章点击量统计</div>
                        <div class="layui-card-body">
                            <div id="base-map" style="width: 100%;height:300px;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="~/themes/js/echarts.min.js"></script>
    <script type="text/javascript" src="~/themes/js/macarons.js"></script>
    <script>
        var d_vm = new Vue({
            el: '#defaultapp',
            data: {
                topList: [],
                model: []
            }
        });

        layui.use(['carousel', 'element', 'layer', 'jquery', 'common'], function () {
            var carousel = layui.carousel
                , os = layui.common
                , element = layui.element
                , $ = layui.jquery;
            var active = {
                init: function () {
                    os.ajax('api/default/weeksale', null, function (res) {
                        if (res.statusCode === 200) {
                            baseChart.hideLoading();
                            var money = [], order = [];
                            $.each(res.data.money, function (i, m) {
                                money.push(m);
                            });
                            $.each(res.data.order, function (i, m) {
                                order.push(m);
                            });
                            baseChart.setOption({
                                series: [
                                    {
                                        name: '订单总数',
                                        type: 'line',
                                        areaStyle: { normal: {} },
                                        data: order
                                    },
                                    {
                                        name: '销售金额',
                                        type: 'line',
                                        areaStyle: { normal: {} },
                                        data: money
                                    }
                                ]
                            });
                        } else {
                            os.error(res.message);
                        }
                    });

                }
            };
            //active.loadTop();
            setTimeout(function () {
                //active.init();
            }, 1000);


        });
        var baseChart = echarts.init(document.getElementById('base-map'), 'macarons');
        baseChart.showLoading();
        var option = {
            title: {
                //show:false,
                //text: '文章点击量统计',
                textStyle: {
                    color: '#888',
                    align: 'center',
                    fontSize: 14,
                    fontWeight: '400'
                }
            },
            tooltip: {
                trigger: 'axis'
            },
            toolbox: {
                feature: {
                    magicType: {
                        type: ['line', 'bar', 'stack', 'tiled']
                    },
                    saveAsImage: {}
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [
                {
                    name: '点击量',
                    type: 'line',
                    areaStyle: { normal: {} },
                    data: [1,2,7,8,4,6,8]
                },
            ]
        };
        baseChart.setOption(option);
        baseChart.hideLoading();
    </script>
</div>
